<?php
$data = array('author' => '白菜大侠' , 'mail' => 'info@aiyooyoo.com','text' => '博主很给力');
//将数组转化为query的形式的参数   但是这里的参数是加密的
$data = http_build_query($data);
$opts = array(
    'http' => array(
        'method' => 'POST',
        'header' => "Content-type:application/x-www-form-urlencoded\r\n".
        "Content-Length:".strlen($data)."\r\n".
        "User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4298.4 Safari/537.36".
        "Referer:http://aiyooyoo.com/index.php/archives/7/"."\r\n",
        'content' => $data
    )
);
$context = stream_context_create($opts);
$html = @file_get_contents('http://aiyooyoo.com/index.php/archives/7/comment',false,$context);
var_dump($html);
